#include <iostream>
using namespace std;


class Point
{
    private:
        int x,y;
    public:
        Point(int a,int b):x(a),y(b){}

        Point operator+(const Point& a) const{return Point(x+a.x,y+a.y);}
        Point operator-(const Point& a) const{return Point(x-a.x,y-a.y);}
        void operator+=(const Point& a){x+=a.x;y+=a.y;}
        void operator-=(const Point& a){x-=a.x;y-=a.y;}
        bool operator==(const Point& a) const{return x==a.x&&y==a.y;}

        friend ostream& operator<<(ostream& os,const Point& p){os<<p.x<<","<<p.y;return os;}

};
int main(int argc, char const *argv[])
{
    Point p1(2,3);
    cout<<p1<<endl;
    Point p2(4,5);
    cout<<p2<<endl;
    Point p3 = p1+p2;    
    cout<<p3<<endl;
    p3 = p2-p1;
    cout<<p3<<endl;
    p1 += p2;
    cout<<p1<<endl;
    cout<<(p1==p2)<<endl;
    return 0;
}
